﻿@model IEnumerable<Unijovem.UI.Models.EventoModel>
@{
    ViewBag.Title = "Social";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="floatLeft" style="width: 650px">
    <h3>
        Social</h3>
    <table>
        <tr>
            <th>
            </th>
            <th>
                Data
            </th>
            <th>
                Hora
            </th>
            <th>
                Categoria
            </th>
            <th>
                Titulo
            </th>
            <th>
                Descricao
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink("Detalhes", "Detalhes", new { id = item.Id }) |
                    @Html.ActionLink("Editar", "Editar", new { id = item.Id })
                </td>
                <td>
                    @item.Data.ToString("dd/MM/yyyy")
                </td>
                <td>
                    @string.Format("{0:hh\\:mm}", item.Hora)
                </td>
                <td>
                    @item.Categoria.Nome
                </td>
                <td>
                    @item.Titulo
                </td>
                <td>
                    @item.Descricao
                </td>
                <td>
                    @if (item.EventoImagems != null && item.EventoImagems.Count > 0)
                    {
                        <span>
                            @Html.ActionLink("Ver fotos", "Detalhes", new { id = item.Id })
                        </span>
                    }
                    @if (item.MaterialApoios != null && item.MaterialApoios.Count > 0)
                    {
                        <span>
                            @Html.ActionLink("Baixar material de apoio", "MaterialApoio", new { id = item.Id })
                        </span>
                    }
                    @if (item.Forum != null)
                    {
                        <span>
                            @Html.ActionLink("Participe do fórum", "Participar", "Forum", new { id = item.Forum.Id }, null)
                        </span>
                    }
                    <span>
                        @Html.ActionLink("Associar Músicas", "Associar", "EventoMusica", new { idEvento = item.Id }, null)
                    </span>
                </td>
            </tr>
        }
    </table>
</div>
@Html.Partial("~/Views/PartialView/Promocao.cshtml", "200")
